package com.gengine.utils
{
	
	public class ChatFraudFilter extends Object
	{
		private static var _source:Array = [];
		private static const LIMITVALUE:Number = 1;
		
		public function ChatFraudFilter()
		{
			
		}
		
		public static function set source(param1:Array) : void
		{
			var _loc_2:Object = null;
			if (param1 != null)
			{
				_source = param1;
				for each (_loc_2 in _source)
				{
					
					_loc_2.rep = new RegExp(_loc_2.rep, "ig");
					_loc_2.point = parseFloat(_loc_2.point);
				}
			}
			
		}
		
		public static function isChatFraud(param1:String) : Boolean
		{
			var _loc_3:Object = null;
			var _loc_2:Number = 0;
			for each (_loc_3 in _source)
			{
				
				if (param1.search(_loc_3.rep) > -1)
				{
					_loc_2 = _loc_2 + _loc_3.point;
					if (_loc_2 >= LIMITVALUE)
					{
						return true;
					}
				}
			}
			return false;
		}
		
	}
}
